package com.ljs.redisall.willow.service.impl;


import com.ljs.redisall.willow.entity.Emp;
import com.ljs.redisall.willow.mapper.EmpMapper;
import com.ljs.redisall.willow.service.EmpService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {
    @Resource
    EmpMapper empMapper;
    @Override
    public int deleteByPrimaryKey(Integer empid) {
        return empMapper.deleteByPrimaryKey(empid);
    }

    @Override
    public int insert(Emp record) {

        return    empMapper.insert(record);
    }

    @Override
    public int insertSelective(Emp record) {
        return empMapper.insertSelective(record);
    }

    @Override
    public Emp selectByPrimaryKey(Integer empid) {
        return empMapper.selectByPrimaryKey(empid);
    }

    @Override
    public int updateByPrimaryKeySelective(Emp record) {
        return empMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Emp record) {
        return empMapper.updateByPrimaryKey(record);
    }

    @Override
    public Emp login(String phone, String password) {
        return empMapper.login(phone,password);
    }

    @Override
    public List<Emp> selall() {
        return empMapper.selall();
    }

    @Override
    public int updateById(int empid,int status) {
        return empMapper.updateById(empid,status);
    }

    @Override
    public List<Emp> selBysearch(Emp emp) {
        return empMapper.selBysearch(emp);
    }
}
